Validate and update links (STF-557)#387
Conversation
There was a problem hiding this comment.
Code Review
This pull request configures the Lychee link checker by adding a lychee.toml configuration file, ignoring its cache in .gitignore, and updating various documentation links across the codebase to use canonical, non-redirecting URLs. Feedback on these changes highlights that setting max_redirects = 0 in the Lychee configuration is overly restrictive and forces fragile URLs; allowing a few redirects is recommended. Additionally, there are broken RST hyperlink syntax errors and typos ('Transations') in the docstrings for the report methods in src/minfraud/webservice.py that need to be corrected.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| # Don't allow any redirects, so links that have moved are surfaced and can be | ||
| # updated to their canonical destination. | ||
| max_redirects = 0 |
There was a problem hiding this comment.
Setting max_redirects = 0 makes the link checker extremely sensitive to standard, benign redirects (such as trailing slashes, HTTPS upgrades, or locale-based redirection like https://www.maxmind.com/ -> https://www.maxmind.com/en/home). This forces the use of fragile, over-specific, and verbose URLs in the documentation (like https://www.maxmind.com/en/accounts/current/people/current instead of https://www.maxmind.com/en/account), which are harder to maintain and may break if internal routing changes.
Consider allowing a small number of redirects (e.g., max_redirects = 3 or 5) to balance link health with maintenance overhead.
| max_redirects = 0 | |
| max_redirects = 3 |
There was a problem hiding this comment.
Intentionally keeping max_redirects = 0. Surfacing moved/redirecting links is the goal of this change (STF-557), and it matches the dev-site and blog-site lychee configs; redirects are resolved by updating the link to its canonical target.
— Claude (posted on Greg's behalf)
| to the Report Transations web service as specified in the `REST API` | ||
| documentation | ||
| <https://dev.maxmind.com/minfraud/report-a-transaction?lang=en>_. | ||
| <https://dev.maxmind.com/minfraud/report-a-transaction/?lang=en>_. |
There was a problem hiding this comment.
The RST hyperlink formatting here is broken because the opening backtick on line 391 was closed early (i.e., `REST API` instead of leaving it open). This leaves the URL on line 393 with a dangling trailing underscore _, which is invalid RST syntax and won't render the link correctly.
Additionally, there is a typo on line 391: "Transations" should be "Transactions".
To fix both issues, please update the docstring block in your editor to:
:param report: A dictionary containing the transaction report to be sent
to the Report Transactions web service as specified in the `REST API
documentation
<https://dev.maxmind.com/minfraud/report-a-transaction/?lang=en>`_.There was a problem hiding this comment.
Good catch — fixed in a separate commit: the link-text backtick was closed early and the closing `_ was missing, so the URL rendered as plain text.
— Claude (posted on Greg's behalf)
| to the Report Transations web service as specified in the `REST API` | ||
| documentation | ||
| <https://dev.maxmind.com/minfraud/report-transaction/#Request_Body>_. | ||
| <https://dev.maxmind.com/minfraud/report-a-transaction/?lang=en>_. |
There was a problem hiding this comment.
The RST hyperlink formatting here is broken because the opening backtick on line 655 was closed early (i.e., `REST API` instead of leaving it open). This leaves the URL on line 657 with a dangling trailing underscore _, which is invalid RST syntax and won't render the link correctly.
Additionally, there is a typo on line 655: "Transations" should be "Transactions".
To fix both issues, please update the docstring block in your editor to:
:param report: A dictionary containing the transaction report to be sent
to the Report Transactions web service as specified in the `REST API
documentation
<https://dev.maxmind.com/minfraud/report-a-transaction/?lang=en>`_.There was a problem hiding this comment.
Good catch — fixed in a separate commit: the link-text backtick was closed early and the closing `_ was missing, so the URL rendered as plain text.
— Claude (posted on Greg's behalf)
a0f7f01 to
78065b9
Compare
d88b8e7 to
3ff3873
Compare
Part of STF-557. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- pyproject.toml: https://www.maxmind.com/ -> https://www.maxmind.com/en/home - pyproject.toml: https://minfraud.readthedocs.org/ -> https://minfraud.readthedocs.io/en/latest/ - CLAUDE.md: https://minfraud.readthedocs.io/ -> https://minfraud.readthedocs.io/en/latest/ - CLAUDE.md: dev.maxmind.com/minfraud/report-a-transaction -> .../report-a-transaction/ - README.dev.rst: https://pypi.python.org/pypi/minfraud -> https://pypi.org/project/minfraud/ - README.rst: dev.maxmind.com/minfraud/report-a-transaction?lang=en -> .../report-a-transaction/?lang=en - README.rst: dev.maxmind.com/minfraud/api-documentation/requests?lang=en -> .../requests/?lang=en - README.rst: https://minfraud.readthedocs.io/ -> https://minfraud.readthedocs.io/en/latest/ - README.rst: https://www.maxmind.com/en/account -> https://www.maxmind.com/en/accounts/current/people/current - README.rst: https://www.maxmind.com/en/support -> https://support.maxmind.com/knowledge-base - models.py: https://tools.ietf.org/html/rfc3339 -> https://datatracker.ietf.org/doc/html/rfc3339 - models.py: dev.maxmind.com/minfraud/track-devices?lang=en -> .../track-devices/?lang=en - models.py: dev.maxmind.com/minfraud/api-documentation/responses?lang=en#... -> .../responses/?lang=en#... - webservice.py: dev.maxmind.com/minfraud/api-documentation/requests?lang=en -> .../requests/?lang=en - webservice.py: dev.maxmind.com/minfraud/report-a-transaction?lang=en -> .../report-a-transaction/?lang=en - webservice.py: dev.maxmind.com/minfraud/report-transaction/#Request_Body (404) -> .../report-a-transaction/?lang=en Also excluded the amazon.com referrer_uri example value and the JS-rendered dev.maxmind.com responses-schema fragments (verified at the page level) from link checking. Part of STF-557. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Add missing 'v' prefix to action pin version comments (ref-version-mismatch). - Disable uv caching in the release workflow (cache-poisoning); dependency caching is unnecessary for one-off release builds. Part of STF-557. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The link text backtick was closed early and the closing `_ was missing, so the report-a-transaction URL rendered as plain text. Pre-existing; fixed here while validating links. Part of STF-557. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a lychee link checker config (
lychee.toml) and a CI workflow(
.github/workflows/links.yml), then fixes the stale/redirecting links itsurfaced. The config uses
max_redirects = 0so any moved link is surfaced andupdated to its canonical destination.
Links updated (old -> new):
https://www.maxmind.com/->https://www.maxmind.com/en/homehttps://minfraud.readthedocs.org/->https://minfraud.readthedocs.io/en/latest/https://minfraud.readthedocs.io/->https://minfraud.readthedocs.io/en/latest/dev.maxmind.com/minfraud/report-a-transaction->.../report-a-transaction/https://pypi.python.org/pypi/minfraud->https://pypi.org/project/minfraud/dev.maxmind.com/minfraud/report-a-transaction?lang=en->.../report-a-transaction/?lang=endev.maxmind.com/minfraud/api-documentation/requests?lang=en->.../requests/?lang=enhttps://minfraud.readthedocs.io/->https://minfraud.readthedocs.io/en/latest/https://www.maxmind.com/en/account->https://www.maxmind.com/en/accounts/current/people/currenthttps://www.maxmind.com/en/support->https://support.maxmind.com/knowledge-basehttps://tools.ietf.org/html/rfc3339->https://datatracker.ietf.org/doc/html/rfc3339dev.maxmind.com/minfraud/track-devices?lang=en->.../track-devices/?lang=endev.maxmind.com/minfraud/api-documentation/responses?lang=en#schema--response--warning->.../responses/?lang=en#schema--response--warningdev.maxmind.com/minfraud/api-documentation/requests?lang=en->.../requests/?lang=endev.maxmind.com/minfraud/report-a-transaction?lang=en->.../report-a-transaction/?lang=endev.maxmind.com/minfraud/report-transaction/#Request_Body(404) ->.../report-a-transaction/?lang=enExcluded as false positives:
http://www.amazon.com/— an examplereferrer_urivalue in a docstring/doctest, not a documentation link.dev.maxmind.com/minfraud/api-documentation/responses/...#fragments — the dev-site API docs are a JS-rendered single-page app, so in-page anchors aren't present in the static HTML lychee fetches. The pages are verified without the fragment.Final lychee run:
32 Total, 26 OK, 0 Errors, 6 Excluded.ruff format/ruff checkpass on the edited source files.Part of STF-557.
🤖 Generated with Claude Code